#include "commands_python.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>

const struct avgdl_python_list python_action_list[] = {

	{"draw",
		NATIVE,
		(char *[]) {
			"OBJECTS_DRAW",
			"\t\tself.\\1.draw()\n",
		}
	},

	{"draw-array",
		NATIVE,
		(char *[]) {
			"OBJECTS_DRAW",
			"\t\tfor i in range(0, \\2):\n"
			"\t\t\tself.\\1[i].draw()\n",
		}
	},

	{"object",
		RAW,
		"\t\tself.\\1 = Object()\n",
	},

	// test for array of objects
	{"objects",
		RAW,
		"\t\tself.\\1 = list()\n"
		"\t\tfor i in range(0, \\2):\n"
		"\t\t\tself.\\1.append(Object())\n"
	},

	{"colour",
		RAW,
		"\t\tself.\\1.col = (\\2, \\3, \\4)\n",
	},

	{"location",
		RAW,
		"\t\tself.\\1.loc = "
			"(1, 0, 0, 0,"
			" 0, 1, 0, 0,"
			" 0, 0, 1, 0,"
			" \\2, \\3, \\4, 1,)\n",
	},

	{"shape-triangle",
		RAW,
		"\t\tself.\\1.pos = "
			"((0, 1, 0), (-1, -1, 0), (1, -1, 0), )\n",
	},

	{"rotate",
		NATIVE,
		(char *[]) {
			"OBJECTS_UPDATE",
			"\t\tself.\\1.loc = rotate_matrix(self.\\1.loc, \\2, 0)\n",
		}
	},

	{"int",
		RAW,
		"1",
	},

	{"update",
		NATIVE,
		(char *[]) {
			"OBJECTS_UPDATE",
			"",
		}
	},

	/* Example
	{"object", 
		"\1 = new Object();\n"
		"\1.name = \2;"
	},
	*/

};

const int python_action_size = sizeof(python_action_list)
	/sizeof(struct avgdl_python_list);
